home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 18 / Developer Source Volume 18 (I-MODE Publications, Inc.)(2000).iso / msysj / jun97 / dilaf09b.gif < prev    next >
Graphics Interchange Format  |  1998-02-10  |  67KB  |  516x371  |  4-bit (15 colors)
Labels: text | screenshot | number | font | document | parallel
OCR: Figure 9 Continued OnPrintTo Handles IFile Viewer: PrintTo, Returns FALSE with m_hr = E_NOTIMPL. Called from CFile Viewer:OnFinalRelease when the COM object is about to be destroyed (ref count-0), this function elnses the document and destroys the main window. OnGetFileName Lised throughout the code, and to handle [PersistFile; GetCurFile. Default implementation returns the name of the active CDocument as # CString. CanOpenDocument Helper function used to determine if the viewer knows how to open a document, by attempting to match the filename extension with a ChocTemplate in the app's list of supported doc typee. Called from Open DocumentFile and Onload. Overrides of CWinApp/CWinThread virtual functions Open Document File First calls CanOpenDocument to see if the document type is supported; if not, copies filename to strNewFile, sets FNSIF_NEWFILE, and posts a quit message to terminate message loop, otherwise calls CWinApp: Open DocumentFile to open the doc the normal MFC way; ToitInstance Registers file viewer class object and initinlizes doc manager, Required to work around MFC problems. ExitInstance Displays a TRACE message. OnFileOpen Handles File Open command: call ShellExecute to open the file for editing in native app. Run Special message loop required to work around problems in MFC Command handlers OnPinWindow ON COMMAND handler for pin command (View Replace Window) Use in your app's message map. OnUpdatel'in Window ON UPDATE COMMAND) UI handler for pin command, correctly sets the checked unchecked shite of the pin button. Use in your app's message map. Functions Implemented by CFVFrameWnd Now virtual functiont6 OnSetOpenButtonIcon Sets the bitmap for the Open button in the toolhar to the file tyne's shell icon Message handlers OnClose Special handling to work around MFC refusing to post a mit message if there are COM objects outstanding. OnDestroy Unpin window if pinned before normal destroy. On DropFiles Ignore extra files if more than one dropped.